<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>17、其他指令-v-once.html</title>
</head>
<body>

<div id="app">
    <!-- 单个元素 -->
    <span v-pre>This will never change: {{msg}}</span>
    <!-- 有子元素 -->
    <div v-pre>
        <h1>comment</h1>
        <p>{{msg}}</p>
    </div>

    <button @click="changeMsg">改变msg</button>
</div>

<script src="js/vue.global.js"></script>
<script>
    var vm = Vue.createApp({
        created(){
        },
        data() {
            return {
               msg:"Hello Vue3.x"
            }
        },
        methods:{
            changeMsg(){
                this.msg = "Hi Vue3.x";
            }
        }

    }).mount("#app");
</script>

</body>
</html>